package service

import (
	"fmt"
	"github.com/gin-gonic/gin"
	"html/template"
)

// GetIndex
// @Tags 首页
// @Sources 200 {string} welcome
// @Router /index [get]
func GetIndex(c *gin.Context) {
	//c.JSON(http.StatusOK, gin.H{
	//	"message": "welcome to test page",
	//})
	ind, err := template.ParseFiles("index.html")
	if err != nil {
		fmt.Println(err)
		return
	}
	err = ind.Execute(c.Writer, nil)
	if err != nil {
		fmt.Println(err)
		return
	}
}
